package com.eastfair.pay.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.pay.dto.InvoiceApplyerDTO;
import com.eastfair.pay.dto.InvoiceApplyerPageQuery;
import com.eastfair.pay.dto.JYInvoiceDTO;
import com.eastfair.pay.entity.InvoiceApplyer;
import com.eastfair.pay.vo.InvoiceApplyerVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 发票申请
 * </p>
 *
 * @author clm
 * @date 2022-08-06
 */
public interface InvoiceApplyerService extends SuperService<InvoiceApplyer> {
    /**
     * do转vo
     * @param model
    */
    InvoiceApplyerVO doToVo(InvoiceApplyer model);
   /**
    * do转vo
    * @param modelList
   */
    List<InvoiceApplyerVO> doToVos(List<InvoiceApplyer> modelList);


   /**
    * 通用查询
    *
    * @param modelDTO DTO
    * @param ids 主键id集合
    * @return list
    */
   List<InvoiceApplyer> list(InvoiceApplyerDTO modelDTO, List<Long> ids);

  /**
  * 通用查询
  *
  * @param modelDTO DTO
  * @param ids 主键id集合
  * @return list
  */
  List<InvoiceApplyer> listOfCache(InvoiceApplyerDTO modelDTO, List<Long> ids);

  /**
   * @Author clm
   * @Description //保存发票申请
   * @Date 14:51 2022/8/6
   * @Param [invoiceApplyerDTO]
   * @return void
   **/
    void saveInvoiceApplyer(InvoiceApplyerDTO invoiceApplyerDTO);

    /**
     * @Author clm
     * @Description //开票
     * @Date 17:05 2022/8/6
     * @Param [applyId]
     * @return void
     **/
    void invoice(Long applyId);

    /**
     * @Author clm
     * @Description //分页查询
     * @Date 10:44 2022/8/8
     * @Param [params]
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.eastfair.pay.vo.InvoiceApplyerVO>
     **/
    Page<InvoiceApplyerVO> queryList(PageParams<InvoiceApplyerPageQuery> params);


    /**
     * @Author clm
     * @Description //获取发票申请详情
     * @Date 18:13 2023/2/7
     * @Param [businessId]
     * @return com.eastfair.pay.vo.InvoiceApplyerVO
     **/
    InvoiceApplyerVO queryInfoById(Long businessId);

    /**
     * @Author clm
     * @Description //通过业务主键获取发票申请
     * @Date 15:05 2023/2/8
     * @Param [buinessId]
     * @return com.eastfair.pay.vo.InvoiceApplyerVO
     **/
    InvoiceApplyerVO queryInfoByBuinessId(Long buinessId);

    /**
     * @Author clm
     * @Description //审核
     * @Date 11:34 2023/2/14
     * @Param [invoiceApplyer]
     * @return void
     **/
    void examineInvoiceApplyer(InvoiceApplyerDTO invoiceApplyerDTO);

    /**
     * @Author clm
     * @Description //更新
     * @Date 17:58 2023/2/17
     * @Param [invoiceApplyerDTO]
     * @return void
     **/
    void updateInvoiceApplyer(InvoiceApplyerDTO invoiceApplyerDTO);
    /**
     * @Author fwl
     * @Description //荆艺开票审核
     * @Date 11:32 2023/3/3
     * @Param [invoiceDTO]
     * @return void
     **/
    void financialExamine(JYInvoiceDTO invoiceDTO);

    /**
     * 取消开票
     * @param id
     * @author duxiaobo
     * @date 2023/4/10 11:25
     * @return void
     */
    void cancelInvoiceApplyer(Long id);

    /**
     * 通过业务主键集合获取发票申请集合
     * @param buinessIds
     * @return
     */
    List<InvoiceApplyerVO> queryInvoiceExamineState(List<Long> buinessIds);

    void cancelInvoiceApplyerByOrderNum(String orderNum);
}
